package com.sm.scorpio.ui.bean.model;

import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;

/**
 * created by zhud on 2019/7/11
 */
public class UserBean implements Parcelable {
    public static final int USER_SEX_BOY = 1;//男孩
    public static final int USER_SEX_GIRL = 0;//女孩
    public String nickname;
    public String identifying;
    public String sex;

    //用于刷新登录的token
    public String refreshToken;
    //本次登录token
    public String accountToken;

    public UserBean() {
    }

    protected UserBean(Parcel in) {
        nickname = in.readString();
        identifying = in.readString();
        sex = in.readString();
        refreshToken = in.readString();
        accountToken = in.readString();
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(nickname);
        dest.writeString(identifying);
        dest.writeString(sex);
        dest.writeString(refreshToken);
        dest.writeString(accountToken);
    }

    @Override
    public int describeContents() {
        return 0;
    }

    public static final Creator<UserBean> CREATOR = new Creator<UserBean>() {
        @Override
        public UserBean createFromParcel(Parcel in) {
            return new UserBean(in);
        }

        @Override
        public UserBean[] newArray(int size) {
            return new UserBean[size];
        }
    };
}
